<template>
	<view class="container">
		<view>
			<desc-wrapper :title="title" :desc="desc"></desc-wrapper>
			
			<z-card title="起名结果">
				<block v-if="resp">
					<u-grid border @click="click">
						<u-grid-item v-for="item in (resp.list)" :key="item">
							<u-icon :size="22"></u-icon>
							<text class="grid-text">{{item}}</text>
						</u-grid-item>
					</u-grid>
				</block>
			</z-card>
			
			<!-- <z-card>
				<block v-if="resp">
					<u-grid border @click="click">
						<u-grid-item v-for="item in (resp.list)" :key="item">
							<u-icon :size="22"></u-icon>
							<text class="grid-text">{{item}}</text>
						</u-grid-item>
					</u-grid>
				</block>
				<!-- 还要分页 先不做了 -->
			<!-- </z-card> --> 
			<view class="bottom-btns" style="transform: translateY(-100%);" @click="todashi">
				<view class="start-btn" >
					<text >大师起名</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '在线起名',
				desc: '心诚则灵，测算结果仅供参考。',
				resp: null,
			};
		},
		onLoad(opt) {
			const that = this
			let params = JSON.parse(opt.formData)
			uni.request({
				url: 'https://cs.appzdm.com:3000/Dafen/qiming',
				method: 'POST',
				header: {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				data: params,
				success: (res) => {
					that.resp = res.data.data
				},
				fail: (error) => {
					console.error('Request Failed:', error);
				}
			});
		},
		methods: {
           todashi(){
           	uni.switchTab({
           		url:'/pages/tabbar/service'
           	})
           }
		}

	};
</script>
<style lang="scss" scoped>
	@import '../../static/style/common.scss';
	@import '../../static/style/marriage/index.scss';

	::v-deep .u-page__item__slot-icon {
		margin-top: 10rpx;
	}

	::v-deep .u-tabbar-item__text {
		font-size: 10px;
		line-height: normal;
		margin-top: 3px;
	}

	.u-page__item__slot-icon {
		width: 48rpx;
		height: 48rpx;
	}

	.radio-content {
		height: 40rpx;
		display: flex;
		align-items: center;
		margin-left: 20rpx;
	}

	.radio {
		width: 32rpx;
		height: 32rpx;
		border-radius: 50%;
		border: 2rpx solid #275515;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin: 0rpx 26rpx 0rpx 15rpx;
	}

	.radio-active {
		width: 18rpx;
		height: 18rpx;
		border-radius: 50%;
		background-color: #275515;
	}

	.radio-default {
		border: 2rpx solid #0fbda6;
	}

	.radio-right {
		margin-left: 26rpx;
	}

	/deep/ .uni-select {
		height: 56rpx;
		border: 1px solid #22630985;
	}

	.h200 {
		// min-height: 100vh;
	}

	.analysis {
		margin-left: 16rpx;
	}

	.page {
		height: 100vh;
	}

	.group_7 {
		align-items: center;
	}
</style>